package org.skyer.third.gateway.api.enums;


public enum  ServiceMethodEnum {
    /**
     * 京东
     */
    JD(PlatformEnum.JD.getId(),"jdServiceImpl","京东"),
    /**
     * 淘宝
     */
    TAO_BAO(PlatformEnum.TAOBAO.getId(),"taoBaoServiceImpl","淘宝"),

    /**
     * 抖音
     */
    DY(PlatformEnum.DOUYIN.getId(), "douYinServiceImpl","抖音"),

    /**
     * 快手
     */
    KS(PlatformEnum.KUAISHOU.getId(), "kuaiShouServiceImpl","快手"),

    /**
     * 天猫 天猫也用淘宝这一套
     */
    TM(PlatformEnum.TM.getId(), "taoBaoServiceImpl","天猫"),


    RED_BOOK(PlatformEnum.RED_BOOK.getId(), "redBookServiceImpl","小红书"),
    ;


    private Integer code;

    private String method;

    private String name;


    ServiceMethodEnum(Integer code, String method, String name) {
        this.code = code;
        this.method = method;
        this.name = name;
    }



    public  static  String getMethod(Integer id){
        for(ServiceMethodEnum en:ServiceMethodEnum.values()){
            if(id.equals(en.getCode())){
                return en.getMethod();
            }
        }
        return  null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
